/*  1:   */ package org.intellij.images.thumbnail.actions;
/*  2:   */ 
/*  3:   */

import com.intellij.openapi.actionSystem.AnAction;
import com.intellij.openapi.actionSystem.AnActionEvent;
import com.intellij.openapi.vfs.VirtualFile;
import org.intellij.images.thumbnail.ThumbnailView;
import org.intellij.images.thumbnail.actionSystem.ThumbnailViewActionUtil;

/*  4:   */
/*  5:   */
/*  6:   */
/*  7:   */
/*  8:   */
/*  9:   */ 
/* 10:   */ public final class UpFolderAction
/* 11:   */   extends AnAction
/* 12:   */ {
/* 13:   */   public void actionPerformed(AnActionEvent paramAnActionEvent)
/* 14:   */   {
/* 15:34 */     ThumbnailView localThumbnailView = ThumbnailViewActionUtil.getVisibleThumbnailView(paramAnActionEvent);
/* 16:35 */     if (localThumbnailView != null)
/* 17:   */     {
/* 18:36 */       VirtualFile localVirtualFile1 = localThumbnailView.getRoot();
/* 19:37 */       if (localVirtualFile1 != null)
/* 20:   */       {
/* 21:38 */         VirtualFile localVirtualFile2 = localVirtualFile1.getParent();
/* 22:39 */         if (localVirtualFile2 != null) {
/* 23:40 */           localThumbnailView.setRoot(localVirtualFile2);
/* 24:   */         }
/* 25:   */       }
/* 26:   */     }
/* 27:   */   }
/* 28:   */   
/* 29:   */   public void update(AnActionEvent paramAnActionEvent)
/* 30:   */   {
/* 31:47 */     super.update(paramAnActionEvent);
/* 32:48 */     if (ThumbnailViewActionUtil.setEnabled(paramAnActionEvent))
/* 33:   */     {
/* 34:49 */       ThumbnailView localThumbnailView = ThumbnailViewActionUtil.getVisibleThumbnailView(paramAnActionEvent);
/* 35:50 */       VirtualFile localVirtualFile = localThumbnailView.getRoot();
/* 36:51 */       paramAnActionEvent.getPresentation().setEnabled((localVirtualFile != null) && (localVirtualFile.getParent() != null) && (!localThumbnailView.isRecursive()));
/* 37:   */     }
/* 38:   */   }
/* 39:   */ }



/* Location:           E:\idea\

 * Qualified Name:     org.intellij.images.thumbnail.actions.UpFolderAction

 * JD-Core Version:    0.7.0.1

 */